﻿
new Vue({
    el: '#app',
    delimiters:['[[', ']]'],

    data: {
        bundle_id: '',
        banner_name: '',
        banner_orderno: 0,
        banner_image_url: '',
        banner_link_url: '',
    },

    methods: {
        /**
         * 创建新的banner
         */
        newBanner() {
            let url = "{% url 'gma:api_new_banner' %}";
            let data = {
                'banner_type': {{ banner_type }},
                'bundle_id' : this.bundle_id,
                'name' : this.banner_name,
                'orderno' : this.banner_orderno,
                'image_url' : this.banner_image_url,
                'link_url' : this.banner_link_url,
            };
            new my_ajax(url, data, '', '', () => {
                show_toast('创建成功');
                redirect();
            });
        },
    },

    mounted() {
    },
});
